package com.nintendo.bubblechat.netty;

import io.netty.channel.Channel;

import java.util.HashMap;
import java.util.Map;

public class UserChannelRel {
    public static HashMap<String, Channel> manager =new HashMap<>();
    public static void put(String senderId, io.netty.channel.Channel channel) {
        manager.put(senderId, channel);
    }
    public static io.netty.channel.Channel get(String senderId) {
        return manager.get(senderId);
    }
    public static void output() {
        for (Map.Entry<String, io.netty.channel.Channel> entry : manager.entrySet()){
            System.out.println("UserId:"+entry.getKey()+",ChannelId:"+entry.getValue().id().asLongText());
        }
    }
}
